<script setup lang="ts">
import { inBox } from '@/utils/getUid'
import back from "@/components/ui/svgs/back.vue"
import type { OriginAssistantType } from '@/type'

interface AssistantCardProps extends OriginAssistantType {
  hadCompleted: boolean
}

const props = defineProps<AssistantCardProps>()
</script>
<template>
  <div class="w-full h-[96px] px-[16px] flex">
    <div class="h-full w-[90px] rounded-[8px] overflow-hidden shadow-lg">
      <img
        class="w-full h-full object-cover bg-[#fff3f1]"
        :src="props.thumbnail.mobile + '?imageMogr2/thumbnail/500x'"
      />
    </div>

    <div class="flex-1 h-full px-[16px]">
      <div class="flex items-center">
        <div
          class="text-[#202020] text-[18px] font-medium leading-[27px] line-clamp-1"
        >
          {{ props.title }}
        </div>
        <div
          v-if="!hadCompleted && inBox"
          class="w-[30px] min-w-[30px] h-[14px] rounded-[7px] bg-[#EF504F] text-[10px] text-white leading-[14px] text-center"
        >
          NEW
        </div>
      </div>
      <div
        class="text-[#666666] text-[14px] font-normal leading-[20px] mt-[1px] line-clamp-3"
      >
        {{ props.introduction }}
      </div>
    </div>
    <back class="h-[9px] w-[5px] my-auto rotate-180" />
  </div>
</template>
<style scoped></style>
